#ifndef TRAVELLING_STRUCT_CSV
#define TRAVELLING_STRUCT_CSV

#include "travelling_struct.hpp"


class travelling_struct_csv: public travelling_struct
{
   private: 

    static const enum csv_field_tags
	{
	  ID =0,
	  DATE,
	  KM,
	  PLATE_ID,
	  TRAVELLING_TYPE_ID,
	  ACTIVITY_ID,
	  ESTIMATED_CONSUMPTION
	} csv_field;       	

  private:
		
	float estimated_fuel_consumption(bool _include_last_date = true);	

	float latest_price();	

  public:

	travelling_struct_csv(std::vector<std::string> const& v);	

	travelling_struct_csv(): travelling_struct() {};

	float fuel_refund(int _plate_id);	

	float unit_fuel_refund(int _plate_id);

	float fuel_consumption_physical(bool _include_last_date = true);
	
	float fuel_consumption_financial(bool _include_last_date = true);

	static const enum travelling_tags
	{	 	 
	  TRAVEL_KM =0,	  	  
	  UNIT_FUEL_REFUND,
	  FUEL_REFUND,
	  ESTIMATED_FUEL_CONSUMP_PHYSICAL,
	  ESTIMATED_FUEL_CONSUMP_FINANCIAL,
	  LATEST_FUEL_COST,
	  ESTIMATED_NET_REFUND
	} travelling_field;

	//[km, fuel_refund_unit, fuel_refund, estimated_fuel_consumption_liter, estimated_fuel_consumption_money, estimated_net_refund]
	std::vector<float> const calc_travelling_parms(bool _include_last_date = true);
		
};

#endif
